set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/tests)
message("Exe files will be generated in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")

ADD_EXECUTABLE (test_socketclient socketclient.cpp)
TARGET_LINK_LIBRARIES(test_socketclient sockets)

ADD_EXECUTABLE (test_socketserver socketserver.cpp)
TARGET_LINK_LIBRARIES(test_socketserver sockets)

ADD_EXECUTABLE (test_threads thread.cpp)
TARGET_LINK_LIBRARIES(test_threads threads)



# socket_client_test
add_executable(socket_client_test
    socket_client_test.cpp
)
target_link_libraries(socket_client_test sockets gtest gtest_main)

# Add the test to the test pool
add_test(
    NAME socket_client_test
    COMMAND socket_client_test
)

# UDPSocket Test
add_executable(udp_socket_test
    udp_socket_test.cpp
)
target_link_libraries(udp_socket_test sockets gtest gtest_main)

# Add the test to the test pool
add_test(
    NAME udp_socket_test
    COMMAND udp_socket_test
)

# All tests concentrated
add_executable(all_tests
    all_tests.cpp
)
target_link_libraries(all_tests sockets gtest gtest_main)

# Add the test to the test pool
add_test(
    NAME all_tests
    COMMAND all_tests
)
